package renguanyu.app.tools.controller;

import java.net.URL;
import java.util.ResourceBundle;

import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TextArea;
import renguanyu.app.tools.model.anjuke.DataCollect;

public class AnjukeDataCollectSecondHouseController implements Initializable {

	@FXML
	TextArea exeuteLog;

	@Override
	public void initialize(URL location, ResourceBundle resources) {
		exeuteLog.textProperty().bind(DataCollect.executeLogProperty());
	}

	@FXML
	public void dataCollect() {
		new Thread(() -> {
			DataCollect.setExecuteLog("");
			DataCollect.run();
			DataCollect.appendExecuteLog("done");
		}).start();
	}
	
	@FXML
	public void dataCollect1() {
		new Thread(() -> {
			DataCollect.setExecuteLog("");
			DataCollect.run1();
			DataCollect.appendExecuteLog("done");
		}).start();
	}

}
